import http from "../../utils/request/request"
//密码登陆
export function PasswordLogin(data){
    return http({
        url:`/authority/user/login`,
        method:'put',
        data,
    })
}
//短信登陆
export function SmsLogin(data){
    console.log("短信登陆数据",data)
    return http({
        url:`/authority/user/login`,
        method:'post',
        data
    })
}
//获取图形验证码
export function getCaptcha2(){
    return http({
        url:`/authority/captcha`,
        method:"get"
    })
}
//找回密码
export function getCode(data){
    return http({
        url:`/authority/user/retrieve`,
        method:'put',
        data
    })
}
//获取用户信息
export function gethead(){
    return http({
        url:"/authority/user",
        method:"get"
    })
}
//修改用户信息
export function Submituserinfo(data){
    return http({
        url:"/authority/user",
        method:"put",
        data
    })
}
//注册
export function Register(data){
    return http({
        url:"/authority/user/register",
        method:"post",
        data
    })
}
//通过邀请码加入企业
export function join(data){
    return http({
        url:`/authority/user/join/${data}`,
        method:"put"
    })
}
//创建企业
export function CreatEnterprise(data){
    return http({
        url:"/authority/enterprise",
        method:"post",
        data
    })
}